#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: tmf_node_schema.py 
@version:
@time: 2022/06/17 
"""
from TapClientCore.T02_tm_api.v2_api.v2_tm import v2tm as TM


class TMFInstancesNodeSchema:

    @staticmethod
    def _get_metadataInstances_node_schema(node_id):
        return TM.get_metadataInstances_node_schema(node_id).get('data')[0]

    # 获取通过nodeId获取fieldschema
    def get_metadataInstances_field_by_node_id(self, node_id):
        response = self._get_metadataInstances_node_schema(node_id).get('fields')
        return response
